package com.groupbuying.payproducer.constants;

import org.apache.ibatis.jdbc.Null;

/**
 * 支付中心支付标识枚举类
 * value是由支付渠道及支付类型确定（支付串拼接）
 * @Author Vincentxin
 * @Date 2019-05-20
 */
public enum  PayCenterTypeConstants {

    YSWECHATPAY("YINSHENG1","银盛微信支付"),
    YSALIPAY("YINSHENG2","银盛支付宝支付"),
    //银盛通道下的本地积分和余额支付（为了方便处理，无意义）
    YSCURRENCY("YINSHENG3","银盛积分"),
    YSBALANCE("YINSHENG4","银盛余额"),

    NATIVEWECHATPAY("NATIVE1","原生微信支付"),
    NATIVEALIPAY("NATIVE2","原生支付宝支付"),
    //原生通道下的本地积分和余额支付（为了方便处理，无意义）
    NATIVECURRENCY("NATIVE3","原生积分"),
    NATIVEBALANCE("NATIVE4","原生余额"),

    PLATFORMCURRENCY("PLATFORM3","平台积分支付"),
    PLATFORMBALANCE("PLATFORM4","平台余额支付");


    private String message;
    private String value;

    PayCenterTypeConstants(String value,String mes) {
        this.value=value;
        this.message=mes;

    }

    /**
     *
     * @param value
     * @return
     */

    public static PayCenterTypeConstants getEnum(String value) {
        for (PayCenterTypeConstants v : PayCenterTypeConstants.values()) {
            if (v.getValue().equalsIgnoreCase(value)) {
                return v;
            }
        }
         throw new IllegalArgumentException();

    }
    public String getMessage() {
        return message;
    }

    public String getValue() {
        return value;
    }
}
